package com.sz.sidi.exceptions;
/** 
 * @author DT E-mail: dengtao@chinacpby.com
 * @version ����ʱ�䣺Jun 5, 2009 5:51:46 PM  
 */
import org.springframework.dao.DataAccessException;

public class DaoException extends DataAccessException
{
	/**
	 * default serial version ID
	 */
	private static final long serialVersionUID = 1L;
	
	protected Throwable throwable;
	
	private int errcode=1;

	/**
	 * Method 'DaoException'
	 * 
	 * @param message
	 */
	public DaoException(String message)
	{
		super(message);
		this.throwable=new Throwable(message);
	}
	
	public DaoException(String message,int errcode) {
		super(message);
		this.throwable = new Throwable(message);
		this.errcode=errcode;
	}

	/**
	 * Method 'DaoException'
	 * 
	 * @param message
	 * @param throwable
	 */
	public DaoException(String message, Throwable throwable)
	{
		super(message);
		this.throwable = throwable;
	}

	/**
	 * Method 'getCause'
	 * 
	 * @return Throwable
	 */
	@Override
	public Throwable getCause()
	{
		return throwable;
	}
	
	public int getErrcode() {
		return errcode;
	}

}

